using System;
using System.Collections.Generic;
using System.Collections;
using System.Text;
using System.Xml.Serialization;
using Microsoft.MediaCenter.UI;
using System.IO;

namespace ClipShow2.MediaTypes
{
    [Serializable]
    public class ClipShowContent
    {
        public ClipShowContent()
        {
        }

        private string _contentSourceName = "";

        [XmlAttribute]
        public string ContentSourceName
        {
            get
            {
                return (_contentSourceName);
            }
            set
            {
                _contentSourceName = value;
            }
        }

        [XmlElement(Type = typeof(ClipShowMetadata))]
        public ArrayList MediaItems = new ArrayList();
    }


    [Serializable]
    public class ClipShowMetadata
    {
        private string _sourceTitle;
        private string _sourceAuthor;
        private string _sourceDescription;
        private string _sourceUrl = "";
        private Image _thumbnail;
        private string _thumbnailUrl;
        private Int64 _sourceDuration;
        private DateTime _sourceDateTime;
        private bool _isPlaylistItem = false;
        private string _parentalRating;

        [XmlIgnore]
        public bool IsPlaylistItem
        {
            get
            {
                return (_isPlaylistItem);
            }
            set
            {
                _isPlaylistItem = value;
            }
        }

        [XmlAttribute]
        public string ParentalRating
        {
            get { return (_parentalRating); }
            set { _parentalRating = value; }
        }
        [XmlAttribute]
        public Int64 Duration
        {
            get { return (_sourceDuration); }
            set { _sourceDuration = value; }
        }

        [XmlAttribute]
        public DateTime CreationDateTime
        {
            get { return (_sourceDateTime); }
            set { _sourceDateTime = value; }
        }

        [XmlAttribute]
        public string Url
        {
            get { return (_sourceUrl); }
            set { _sourceUrl = value; }
        }

        [XmlAttribute]
        public string Author
        {
            get { return (_sourceAuthor); }
            set { _sourceAuthor = value; }
        }

        [XmlAttribute]
        public string Description
        {
            get { return (_sourceDescription); }
            set { _sourceDescription = value; }
        }

        [XmlAttribute]
        public string Title
        {
            get { return (_sourceTitle); }
            set { _sourceTitle = value; }
        }

        [XmlIgnore]
        public Image Thumbnail
        {
            get { return (_thumbnail); }
            set { _thumbnail = value; }
        }

        [XmlAttribute]
        public string ThumbnailUrl
        {
            get { return (_thumbnailUrl); }
            set { _thumbnailUrl = value; }
        }
    }
}
